//获取一个数二进制序列中所有的偶数位和奇数位， 分别输出二进制序列

import java.util.Scanner;

public class Test13 {
    public static void main(String[] args) {
        System.out.println("请输入一个整数:");
        Scanner scanner=new Scanner(System.in);
        int num =scanner.nextInt();
        System.out.printf("奇数二进制序列为：");
        for(int i=31;i>=0;i=i-2){
            int goal=(num>>i)&1;
            System.out.printf("%d ",goal);
        }
        System.out.println(" ");
        System.out.printf("偶数二进制序列为：");
        for(int i=30;i>=0;i=i-2){
            int goal=(num>>i)&1;
            System.out.printf("%d ",goal);
        }
    }
}
